<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>视差滚动背景效果 纯CSS</title>
    <style>
      .blank{
        width: 100%;
        height: 600px;
      }
      main {
        /* width: 100%; */
        margin: auto;
        padding: 59px 29px;
        border-radius: 0.3em;
        text-shadow: 0 1px 1px hsla(0, 0%, 100%, 0.3);
        box-shadow: 0 0 0 1px hsla(0, 0%, 100%, 0.3) inset,
          0 0.3em 1em rgba(0, 0, 0, 0.12);
        font: 150%/1.6 Baskerville, Palatino, serif;
      }
      main,
      main > div::before {
        background: url("./demo.jpg") fixed 0 / cover;
      }
      main > div::before {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: -1;
        filter: blur(10px);
        margin: -30px;
      }
      main > div {
        font-style: italic;
        color: #000;
        padding: 30px;
        hyphens: auto;
        background: hsla(0, 0%, 100%, 0.5);
        overflow: hidden;
        position: relative;
      }
      main > div cite {
        font-style: normal;
      }
      main footer {
        text-align: right;
      }
    </style>
  </head>
  <body>
    <div class="blank">
      ......................
    </div>
    <main class="main">
      <div>
        "O God, I could be bounded in a nutshell and count myself a king of
        infinite space, were it not that I have bad dreams."<br />
        <footer>
          ——
          <cite>William Shakespeare</cite>
        </footer>
      </div>
    </main>
    <div class="blank">
      ......................
    </div>
  </body>
</html>
